package com.xca.znb.model.impl;

import android.content.Context;

import com.xca.znb.database.UserDAO;
import com.xca.znb.entity.Trends;
import com.xca.znb.entity.User;
import com.xca.znb.model.imodel.IMyFriends;

import java.util.List;

public class MyFriendsImpl implements IMyFriends {
    private UserDAO userDAO ;
    public MyFriendsImpl(Context context){
        userDAO = new UserDAO(context);
    }

    @Override
    public User getUserByPhone(String phone) {
        return userDAO.getUser(phone);
    }

    @Override
    public void deleteTrendsById(int id) {
        userDAO.deleteTrendsById(id);
    }

    @Override
    public List<Trends> getTrendsByUser(String user) {
        return userDAO.getTrendsByUser(user);
    }
}
